#include<stdio.h>
#include<string.h>

int main()
{
	int n = 0, i = 0, j = 0;
	char a[100] = {'\0'}, b, c[100] = {'\0'};
	gets(a);
	b = getchar();
	int len = strlen(a);
	for(i = 0; i < len; i++)
	{
		if(a[i] != b)
		{
			c[j] = a[i];
			j++;
		}
	}
	c[j] = '\0';
	printf("%s", c);
	return 0;
}
